package com.excetop.xservlet.req.param;

import javax.servlet.http.Part;

/**
 * 多媒体部分(文件)参数
 * @author xuZW
 *
 */
public class FileParam extends Param {

	/**
	 * 多媒体部分(文件)参数值
	 */
	private Part fileValue;
	
	/**
	 * 多媒体部分(文件)参数值数组
	 */
	private Part[] fileValueArray;

	public FileParam() {
	}
	
	public FileParam(String name, Part[] fileValueArray) {
		this(name, fileValueArray, null);
	}
	
	public FileParam(String name, Part[] fileValueArray, String[] patternArray) {
		super(name, TYPE_FILE, patternArray);
		if(null != fileValueArray){
			this.fileValueArray = fileValueArray;
			if(fileValueArray.length > 0){
				this.fileValue = fileValueArray[0];
			}
		}
	}
	
	public Part getFileValue() {
		return fileValue;
	}

	public void setFileValue(Part fileValue) {
		this.fileValue = fileValue;
	}

	public Part[] getFileValueArray() {
		return fileValueArray;
	}

	public void setFileValueArray(Part[] fileValueArray) {
		this.fileValueArray = fileValueArray;
	}

	@Override
	public boolean verifying() {
		boolean result = true;
		// TODO Auto-generated method stub
		return result;
	}
	
}
